package com.yf.service.course;

import com.yf.entity.course.LessonEntity;
import com.yf.service.BaseService;
import com.yf.vo.*;

import java.util.List;
import java.util.Map;


/**
 * 章节Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Tue Oct 23 16:19:27 CST 2018
 */
public interface LessonService extends BaseService<LessonEntity> {

    //获取课程章节
    List<LessonEntity> getList(Long courseId,Long userId);

    //课程总课时
    Integer getCount(Long courseId);

    /**
     * back 章节信息
     * @return
     */
    List<LessonBackVo> lessonList(Map<String, Object> params);

    /**
     * 判断章节视频是否已经购买
     */
    LessonVideoVO lessonVideo(Long userId, Long lessonId);

    /**
     * 查询购买人数
     *
     */
    List<LearningNumber> getLearningNumber(List<Long> lessonIds);


    List<OptCourseBackVo> courseList();

    /**
     * 章节详细信息
     */
    LessonEntity getLesson(Long lessonId,Long userId);

    /**
     * 若课程已购买，返回章节的全部地址
     * @param courseId
     * @return
     */
    List<String> getLessonUrlByCourseId(Long courseId);

    /**
     * 用户已经购买的章节
     *
     */
    List<LessonRecordVO> getPaidLessonList(Long userId);
}
